#include "stdafx.h"
#include "VoronoiFactory.h"

#include "..\Generators\Voronoi.h"
#include "../../../Framework/Toolkit.h"

using namespace Framework;

namespace MyGame {

VoronoiFactory::VoronoiFactory(void) {
}

VoronoiFactory::~VoronoiFactory(void) {
}

Generator* VoronoiFactory::Generate() const {
    Voronoi* voronoi = new Voronoi();
    voronoi->SetBlend((FLOAT)Toolkit::RandomFloat());
    voronoi->SetCells(Toolkit::RandomInt(2, 32));
    voronoi->SetFeatures((FLOAT)Toolkit::RandomFloat());
    voronoi->SetScale((FLOAT)Toolkit::RandomFloat());
    voronoi->SetType((VoronoiType)(rand() % 3));
    return voronoi;
}

}
